package org.im.service.message.bean;

public enum MessageType {
	//普通的字符串消息
	NORMAL_TXT(1),
	
	//需要模板解析的字符串消息
	TEMPLATE_TXT(2),
	
	USER_INFO(3)
	
	;

	private int type;

	private MessageType(int type) {
		this.type = type;
	}

	public int getType() {
		return type;
	}
	
	public static MessageType valueOf(int type) {
		switch (type) {
			case 1 : return NORMAL_TXT;
			case 2 : return TEMPLATE_TXT;
			case 3 : return USER_INFO;
			default : return NORMAL_TXT;
		}
	}
}
